<?php

//Transport
class Form_Goods_Create extends Base_Form
{
    public function init()
    {
		$this->addElements(array(
			// Add an username element
            new Zend_Form_Element_Select('gid', array(
                'required'   => true,
                'label'      => 'Group:',
                'multiOptions' => array(),
                'filters'    => array('StringTrim'),
                'validators' => array(
					array('validator'=> 'Int')
                )
            )),
			// Add an username element
            new Zend_Form_Element_Text('fid', array(
                'required'   => true,
                'label'      => 'Goods id:',
                'multiOptions' => array(),
                'filters'    => array('StringTrim'),
                'validators' => array(
					array('validator'=> 'Int')
                )
            )),
			// Add an username element
            new Zend_Form_Element_Text('master', array(
                'required'   => true,
                'label'      => 'Master Name:',
                'filters'    => array('StringTrim'),
                'validators' => array(
					array('validator' => 'StringLength', 'options' => array(4,30))
                )
            )),
        ));

        $this->addDisplayGroup(
            array('gid', 'fid', 'master'), 'family',
			array(
				'legend' => 'Goods'
			)
		);
    }
}